import request from '@/router/axios';

export const list = (data) => request({
    url: '/award-setting/list',
    method: 'post',
    data
}).then(data => {
    data.rows.forEach(row => {
        row.Award = row.Award / 100;
        row.MinValue = row.MinValue / 100;
        row.MaxValue = row.MaxValue / 100;
    });
    return data;
});
export const create = (data) => request({
    url: '/award-setting/create',
    method: "post",
    data
});
export const update = (data) => {
    data.MaxValue = parseFloat(data.MaxValue);
    data.MinValue = parseFloat(data.MinValue);
    return request({
        url: '/award-setting/update',
        method: "post",
        data
    });
}
